package com.example.demo.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@Schema(description = "用户资料更新请求")
public class ProfileUpdateDTO {

    @Size(min = 1, max = 50, message = "姓名长度必须在1-50个字符之间")
    @Schema(description = "用户真实姓名", example = "张三")
    private String name;

    @Email(message = "邮箱格式不正确")
    @Schema(description = "电子邮箱", example = "user@example.com")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号码", example = "13800138000")
    private String phone;

    @Schema(description = "头像URL", example = "https://example.com/avatar.jpg")
    private String avatar;
}